package gameEngine;

import gameBasicElements.Board;
import gameBasicElements.Move;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Igor Adamski
 *
 */
public class GameHistory {
	private int turn;
	private List<Board> boards;
	private List<Move> moves;
	public GameHistory(Board emptyBoard) {
		boards = new ArrayList<Board>();
		moves = new ArrayList<Move>();
		boards.add(emptyBoard);
		moves.add(null);
		this.turn = 0;
	}
	public Board getBoardAtTurn(int nr) {
		return boards.get(nr);
	}
	public Move getMoveAtTurn(int nr) {
		return moves.get(nr);
	}
	public int getCurrentTurn() {
		return turn;
	}
	
	public void nextTurn(Board b, Move m) {
		boards.add(b);
		moves.add(m);
		++turn;
	}
}
